﻿namespace Modbus.Messages
{
	internal sealed class GetCommEventCounterResponse : ModbusMessage
	{
		private short  status;
		private ushort eventCount;

		public override void Read(ModbusReader reader)
		{
			base.Read(reader);

			this.status = reader.ReadInt16();
			this.eventCount = reader.ReadUInt16();
		}

		public override void Write(ModbusWriter writer)
		{
			base.Write(writer);

			writer.Write(this.status);
			writer.Write(this.eventCount);
		}

		public short Status
		{
			get { return this.status; }
			set { this.status = value; }
		}

		public ushort EventCount
		{
			get { return this.eventCount; }
			set { this.eventCount = value; }
		}
	}
}
